package com.goldmantis.alitrip.service;

import com.goldmantis.alitrip.common.BaseService;
import com.taobao.api.ApiException;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.AlitripBtripApplyGetRequest;
import com.taobao.api.response.AlitripBtripApplyGetResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:Shmily
 * @Description:
 * @Date:Create in 16:54 2018/1/25
 */
@Service
public class ApprovalGetService extends BaseService {


    @Autowired
    private TaobaoClient client;

    public AlitripBtripApplyGetResponse getApproval(Long applyId) throws Exception {
        AlitripBtripApplyGetRequest req = new AlitripBtripApplyGetRequest();
        req.setApplyId(applyId);
        req.setCorpId(corp_id);
        AlitripBtripApplyGetResponse rsp = client.execute(req, accessToken);
        return rsp;
    }
}
